package com.halflife.comeElectricity.batteryBox;

import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public interface BatteryBoxRepository {

    int deleteByPrimaryKey(Integer id);

    int insert(BatteryBox batteryBox);

    int insertSelective(BatteryBox batteryBox);

    BatteryBox selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(BatteryBox batteryBox);

    int updateByPrimaryKey(BatteryBox batteryBox);

    List<BatteryBox> selectAll(Map<String, Object> param);

    int selectCount(Map<String, Object> param);

    List<BatteryBox> selectListByPage(Map<String, Object> param);

    @Select({"${sql}"})
    @ResultMap("BaseResultMap")
    List<BatteryBox> selectMany(@Param("sql") String sql);

    @Select({"${sql}"})
    @ResultMap("BaseResultMap")
    BatteryBox selectOne(@Param("sql") String sql);



}